<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>任课老师审批页面</title>
    <style type="text/css">
        xy-td {
            justify-content: center;
        }

        xy-input {
            margin: 10px;
        }
    </style>

    <script charset="utf-8" src="../tools/jquery-3.6.0.min.js" type="text/javascript"></script>
</head>
<body>
<script type="module">
    import '../xy-ui/index.js';
</script>

<xy-input onsubmit="reload(this.value)" type="search"></xy-input>
<!--查出所有请假信息-->
<xy-table thead="请假编号,学号,姓名,请假课程,请假时段,请假原因,任课老师,任课老师意见,辅导员,状态">
    <xy-tr th:each="item:${list}">
        <xy-td th:text="${item.leId}">1800500926</xy-td>
        <xy-td th:text="${item.id}">1800500926</xy-td>
        <xy-td th:text="${item.name}">谭熙</xy-td>
        <xy-td th:text="${item.course}">基础会计</xy-td>
        <xy-td th:text="${item.duringDate}">2021-07-25至2021-07-31</xy-td>
        <xy-td th:text="${item.reason}">回家种田</xy-td>
        <xy-td th:text="${item.teacher}">王冲</xy-td>
        <xy-td th:text="${item.mark}">不同意请假，课程重要</xy-td>
        <xy-td th:text="${item.counselor}">张雪笛</xy-td>

        <xy-td th:if="${item.status} == '0'">已提交</xy-td>
        <xy-td th:if="${item.status} == '1'">教师通过</xy-td>
        <xy-td th:if="${item.status} == '2'">教师不通过</xy-td>
        <xy-td th:if="${item.status} == '3'">辅导员通过</xy-td>
        <xy-td th:if="${item.status} == '4'">辅导员不通过</xy-td>
        <xy-td th:if="${item.status} == '5'">延期申请</xy-td>
        <xy-td th:if="${item.status} == '6'">已完成</xy-td>
    </xy-tr>

</xy-table>

<script type="text/javascript">
    function reload(keyword) {
        window.location.href = "/leave/dataAll?keyword=" + keyword
    }
</script>
</body>
</html>
